package com.houbank.demo.rabbitmq.person.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.houbank.demo.rabbitmq.utils.DateYMDHMSJsonDeserializer;
import com.houbank.demo.rabbitmq.utils.JsonDateFormatFull;

import java.util.Date;

/**
 * Created by zhaoqiguo on 2016/9/21.
 */
public class User {


    private Date updateDate;

    //date -- > string
    @JsonSerialize(using = JsonDateFormatFull.class)
    public Date getUpdateDate() {
        return updateDate;
    }
    //string -- > date
  @JsonDeserialize(using = DateYMDHMSJsonDeserializer.class)
    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }
}
